package multimedia.control.business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;

	public class CategoryDelegate
	{
		/**
		 * the responder which should be called on result or fault
		 */
		private var responder:IResponder;
		/**
		 * the service to call
		 */
		private var service:RemoteObject = ServiceLocator.getInstance().getRemoteObject("categories");
		
		
		public function CategoryDelegate(responder:IResponder)
		{
			this.responder = responder;
		}
		
		public function getCategories():void
		{
			var token:AsyncToken = service.getCategories();
			token.addResponder(responder);
		}
	}
}